import instance from "../utils/index";
// 注册
export const registerUser = (registers) =>
  instance({ url: `/api/register`, data: { registers }, method: "post" });
// 登录
export const loginUser = (login, password) =>
  instance({ url: `/api/logins`, data: { login, password }, method: "post" });
// 搜索
export const searchs = (names) =>
  instance({ url: `/searchList`, data: { names }, method: "post" });
export const searchList=(names)=>instance({url:'/pagsearch',data:{names},method:'post'})
// 分页数据
export const pageList = ({ params }) =>
  instance({ url: "/pages", params, method: "post" });
  export const pageLists = ({ params }) =>
  instance({ url: "/pageList", params, method: "post" });
// 全部数据
export const allList = () => instance({ url: "/list", method: "get" });
// 删除
export const dellists = (pid) =>
  instance({ url: "/dellist", data: { pid }, method: "post" });
// 添加
export const addList = (formLabelAlign) =>
  instance({ url: "/addLidst", data: { formLabelAlign }, method: "post" });
// 修改
export const chageList = (formLabelAlign) =>
  instance({ url: "/compile", data: { formLabelAlign }, method: "post" });
// 退出
export const logout = () => instance({ url: "/api/exit", method: "post" });

// 线路数据
 export const lineList=()=>instance({url:'/line',method:'get'})
//  幸运轮盘数据
export const luckyDraw=()=>instance({url:'/luckyDraw',method:'get'})
